// -*- Mode: c++ -*-
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <allegro5/allegro5.h>
#include "view.h"

class MainWindow : public View {
public:
     MainWindow(ALLEGRO_DISPLAY *pDisplay);
     virtual ~MainWindow();
     void handleEvents();

protected:
     static const int MaxFramerate = 40;
     bool m_quit;
     double m_lastFlip;
     ALLEGRO_DISPLAY *m_pDisplay;
     ALLEGRO_EVENT_QUEUE *m_pQueue;
     Point m_windowPos;

     double secsSinceFlip();
     double secsPerFrame();
};

#endif
